<div class="form-group clearfix">
  <div class="form-inline pull-right">
    <nz-datepicker
      [nzSize]="'large'"
      (ngModelChange)="_startDate=$event;_startValueChange()"
      [(ngModel)]="_startDate"
      [nzDisabledDate]="_disabledStartDate"
      nzShowTime
      [nzFormat]="'YYYY-MM-DD'"
      [nzPlaceHolder]="'起始时间'">
    </nz-datepicker>
    <nz-datepicker
      [nzSize]="'large'"
      (ngModelChange)="_endDate=$event;_endValueChange()"
      [(ngModel)]="_endDate"
      [nzDisabledDate]="_disabledEndDate" nzShowTime
      [nzFormat]="'YYYY-MM-DD'"
      [nzPlaceHolder]="'结束时间'">
    </nz-datepicker>
    <input type="text" class="form-control" name="searchData" [(ngModel)]="searchData" placeholder="手机号/名称" (keydown)="keyDown($event)">
    <button class="btn btn-success" (click)="search();">搜索</button>
    <button class="btn btn-default" (click)="reset();">重置</button>
  </div>
</div>
<div class="table-responsive">
  <nz-spin [nzTip]="'正在读取积分列表...'" [nzSpinning]="_isSpinning" [nzSize]="'large'" class="admin-spin">
    <table class="table">
      <thead>
      <tr>
        <th style="width:200px;">手机号</th>
        <th style="width:200px;">名称</th>
        <th style="width:200px;">积分</th>
        <th style="width:200px;">操作</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let item of integralList">
        <td>{{ item.mobile }}</td>
        <td>{{ item.nickName }}</td>
        <td>{{ item.point }}</td>
        <td>
          <a href="javascript:;" (click)="showDetailModal(item.orders)">积分详情</a>
        </td>
      </tr>
      </tbody>
    </table>
  </nz-spin>
</div>
<app-notification [type]="type" [message]="message" [isShow]="isShow"
                  (promptIsShow)="isShow = $event;"></app-notification>

<!-- detailModal -->
<div class="modal fade" bsModal #detailModal="bs-modal" tabindex="-1">
  <div class="modal-dialog modal-xs">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">积分详情</h4>
        <button type="button" class="close pull-right" aria-label="Close"
                (click)="detailModal.hide();">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <div class="form-group clearfix item-center" *ngIf="editItem.length > 0">
          <div class="col-md-10 col-md-offset-1">
            <div class="checked-wrap" *ngFor="let task of editItem;let i = index;">
              <div class="checked-info">
                <span>任务名称: </span>
                <span>{{ task.task.task_name }}</span>
              </div>
              <div class="checked-info">
                <span>任务编号: </span>
                <span>{{ task.task.task_no  }}</span>
              </div>
              <div class="checked-info">
                <span>任务数量: </span>
                <span>{{ task.quantity  }}</span>
              </div>
              <div class="checked-info">
                <span>任务积分: </span>
                <span>{{ task.task.point  }}</span>
              </div>
            </div>
          </div>
        </div>

        <div class="text-center mt20">
          <button class="btn btn-success btn-md-long" type="button"
                  (click)="detailModal.hide();">确 定
          </button>
        </div>
      </div>
    </div>
  </div>
</div>
